{% extends "admin/change_list.html" %}
{% load i18n admin_urls static %}

{% block content_title %}
    <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;">
        <h1>{{ title }}</h1>
        <div>
            <a href="{{ rounds_grouped_url }}" 
               class="button" 
               style="background: #007bff; color: white; padding: 8px 16px; border-radius: 4px; text-decoration: none; margin-right: 10px;">
                🎮 查看回合数据分组
            </a>
            {% if cl.has_add_permission %}
                <a href="{% url cl.opts|admin_urlname:'add' %}{% if is_popup %}?{{ is_popup_var }}=1{% endif %}" class="addlink">
                    {% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %}
                </a>
            {% endif %}
        </div>
    </div>
{% endblock %}

{% block result_list %}
    <div style="background: #f8f9fa; padding: 15px; border-radius: 8px; margin-bottom: 20px; border: 1px solid #dee2e6;">
        <h4 style="margin-top: 0; color: #495057;">📊 快速访问</h4>
        <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px;">
            <a href="{{ rounds_grouped_url }}" 
               style="display: block; padding: 15px; background: white; border: 1px solid #dee2e6; border-radius: 4px; text-decoration: none; color: #495057; text-align: center; transition: all 0.2s;">
                <div style="font-size: 24px; margin-bottom: 5px;">🎮</div>
                <div style="font-weight: bold;">回合数据分组</div>
                <div style="font-size: 12px; color: #6c757d;">按对战记录查看回合</div>
            </a>
            <a href="{% url 'admin:battles_dashboard' %}" 
               style="display: block; padding: 15px; background: white; border: 1px solid #dee2e6; border-radius: 4px; text-decoration: none; color: #495057; text-align: center; transition: all 0.2s;">
                <div style="font-size: 24px; margin-bottom: 5px;">📈</div>
                <div style="font-weight: bold;">数据仪表板</div>
                <div style="font-size: 12px; color: #6c757d;">查看统计分析</div>
            </a>
            <a href="{% url 'admin:battles_battlestatistics_changelist' %}" 
               style="display: block; padding: 15px; background: white; border: 1px solid #dee2e6; border-radius: 4px; text-decoration: none; color: #495057; text-align: center; transition: all 0.2s;">
                <div style="font-size: 24px; margin-bottom: 5px;">🏆</div>
                <div style="font-weight: bold;">用户统计</div>
                <div style="font-size: 12px; color: #6c757d;">查看玩家数据</div>
            </a>
            <a href="{% url 'admin:battles_battleround_changelist' %}" 
               style="display: block; padding: 15px; background: white; border: 1px solid #dee2e6; border-radius: 4px; text-decoration: none; color: #495057; text-align: center; transition: all 0.2s;">
                <div style="font-size: 24px; margin-bottom: 5px;">⚡</div>
                <div style="font-weight: bold;">回合管理</div>
                <div style="font-size: 12px; color: #6c757d;">管理单个回合</div>
            </a>
        </div>
    </div>
    
    {{ block.super }}
{% endblock %}

{% block extrahead %}
    {{ block.super }}
    <style>
        .quick-access-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }
    </style>
{% endblock %}